package com.zkthink.ceres.common.enums;

import com.zkthink.exception.BizException;
import lombok.Getter;

/**
 * @ClassName MatchMakerEnum
 * @Description: 红娘类型
 * @Author ck
 * @Date 2021/11/10
 * @Version V1.0
 **/
@Getter
public enum MatchMakerEnum {
    NOT_HN(0, "不是红娘"),
    JZ_HN(1, "兼职红娘"),
    PT_HN(2, "红娘"),
    TP_HN(3, "铜牌红娘"),
    YP_HN(4, "银牌红娘"),
    JP_HN(5, "金牌红娘"),
    LOVE_TUTOR(6, "爱情导师");

    private int code;

    private String desc;

    MatchMakerEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static MatchMakerEnum getDscByType(Integer type) {
        for (MatchMakerEnum p : values()) {
            if (p.getCode() == type.intValue()) {
                return p;
            }
        }
        throw new BizException("no support promotionPlan");
    }
}